<template>
	<view>
		<!-- commission头部组件 -->
		<commheader></commheader>
		
		<!-- 大小潮人权益组件 -->
		<vipquanyi></vipquanyi>
		
		<view class="yue_tui_box">
		<navigator hover-class="none" url="" class="yue_tui">
			<image src="http://wx.crh2009.com/addons/ewei_shopv2/plugin/commission/static/js/qian/loaa.png" class="shengimg" mode="widthFix"></image>
		</navigator>
		</view>
		<view class="yue_tui_box">
		<navigator hover-class="none" url="" class="yue_tui">
			<image src="http://wx.crh2009.com/addons/ewei_shopv2/plugin/commission/static/js/qian/jiaimg.png" class="shengimg" mode="widthFix"></image>
		</navigator>
		</view>
		
		<!-- 任务组件 -->
		<dayrw></dayrw>
		
		<!-- 侧边栏 -->
		<fixce></fixce> 
		<!-- 回到顶部start -->
		<view class="top" :style="{'display':(topState===true? 'block':'none')}">
		<image src="../../static/huitop.png" class="huitop"
		@tap="top()">
		</image>
		</view>
			<!-- 回到顶部end-->
			
	</view>
</template>

<script>
	import fixce from '../../component/fixce.vue';  //侧边栏组件
	import commheader from '../../component/commission/commheader.vue';  //commission头部组件 
	import vipquanyi from '../../component/commission/vipquanyi.vue';    // 大小潮人权益组件 
	import dayrw from '../../component/commission/dayrw.vue';  //任务组件
	export default{
		components:{
		fixce,
		commheader,
		vipquanyi,
		dayrw
		},
		data(){
			return{
				 topState:false
			}
		},
		// 回到顶部start
		onPageScroll(e){ //根据距离顶部距离是否显示回到顶部按钮
		    if(e.scrollTop>200){ //当距离大于200时显示回到顶部按钮
		        this.topState = true
		    }else{ //当距离小于200时关闭回到顶部按钮
		        this.topState = false
		    }
		},
		// 回到顶部end
		methods:{
			top() { //回到顶部
			　　　　uni.pageScrollTo({ 
			　　　　　　scrollTop: 0, duration: 300 
			　　　　}); 
			　　}
		}
	}
</script>

<style>
	.yue_tui_box{
		width:95%;
		margin:15rpx auto;
		margin-top:25rpx;
	}
	.yue_tui{
		width: 100%;
		display: flex;
		justify-content: space-around;
		align-items: center;
	}
	.yue_img{
		width:90%;
		margin:20rpx 0;
	}
	.shengimg{
		width:100%;
	}
</style>
